<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>增加新闻</title>
<link href="admin/css/adminstyle.css" rel="stylesheet" type="text/css">

<SCRIPT lanuage="JScript">
<!--
function tempturnit(ss)
{
 if (ss.style.display=="") 
  ss.style.display="none";
 else
  ss.style.display=""; 
}
-->
</SCRIPT>
<script>
function ReTempBak(){
	self.location.reload();
}
</script>
<? echo $ueditor; ?>
</head>

<body>


  <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  <form  method="post" id="form1" name="form1" ><input name="id" type="hidden" value="<?=$_GET['id']?>">
    <tr class="header"> 
      <td height="25" colspan="2">增加新闻        </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">标题</td>
      <td width="81%" height="25"> <input name="title" type="text"  value="<?=$title?>"> 
      </td>
    </tr>
       <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">推荐</td>
      <td width="81%" height="25"><input name="recommend" type="checkbox" value="1" <? if ($recommend==1){echo 'checked="CHECKED"';} ?> >     </td>
    </tr>
         <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">热销</td>
      <td width="81%" height="25"><input name="hot" type="checkbox" value="1" <? if ($hot==1){echo 'checked="CHECKED"';} ?> >     </td>
    </tr>
         <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">精品</td>
      <td width="81%" height="25"><input name="refined" type="checkbox" value="1" <? if ($refined==1){echo 'checked="CHECKED"';} ?> >     </td>
    </tr>
    
        <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">新品</td>
      <td width="81%" height="25"><input name="new" type="checkbox" value="1" <? if ($new==1){echo 'checked="CHECKED"';} ?> >     </td>
    </tr>
       <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">所属父栏目</td>
      <td width="81%" height="25">
   
      <select name="class_id" size="12"  id="select">
         <option value="0"  <?
         if ($class_id==0){
		 	echo "selected";
		 }
		 ?>  >根栏目</option>
        <?
        function  classInfo ($data,$leve=0,$tmp,$class_id)
		{
			if (!empty($data))
			{
				if ($leve>0)
				{
					$tmp="&nbsp;&nbsp;".$tmp;
				}
				$leve++;
				
				foreach ($data as $v)
				{
					?>
        <option value="<?=$v['id']?>"   <?
 

 
		 if ($class_id == $v['id']){
		 	echo "selected";
		 }
		?>   ><? echo $tmp."|-".$v['title']; ?></option>
					<?
                    classInfo($v['next'],$leve,$tmp,$class_id);
				}
				
			}
		}
		classInfo($class,0,"",$class_id);
		?>        
      </select></td>
    </tr>
    
    
    <?
    if ($_SESSION['admin']['permissions']==1){
	?>
    <?
	}
	?>
      
    
      <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">图片</td>
      <td width="81%" height="25"> 
       <? echo $upload; ?>
      <? echo $add; ?>
      </td>
    </tr>
    
     <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">规格</td>
      <td width="81%" height="25"><input name="standard" type="text" value="<?=$standard?>" > 
      </td>
    </tr>
    
    <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">重量</td>
      <td width="81%" height="25"><input name="weight" type="text" value="<?=$weight?>" > 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="19%" height="25">编号</td>
      <td width="81%" height="25"><input name="number" type="text" value="<?=$number?>" > 
      </td>
    </tr>
    
    
       <tr bgcolor="#FFFFFF"> 
      <td height="25" colspan="2">内容</td>
    </tr>
      <tr bgcolor="#FFFFFF"> 
      <td height="25" colspan="2" align="center"><? echo $addUeditor; ?></td>
    </tr>
    
    <tr bgcolor="#FFFFFF"> 
      <td height="25">&nbsp;</td>
      <td height="25"><input type="submit" name="submit" value="提交"> <input type="reset" name="Submit2" value="重置">
              </td>
    </tr>
	</form>

  </table>
  <script>
  function open2()
{
	lhgdialog.opendlg( '上传文件', 'admin_upload.html', 500, 600, true );
}
  </script>
</body>
</html>
